<?php

require_once(dirname(__FILE__) . "/rss_creator_plugin.int.php");

class yandex_rss_creator_plugin implements rss_creator_plugin
{

	public function modify_rss_node(xdom $rss_xdom)
	{
		$rss_xdom->set_attr("xmlns:yandex", "http://yandex.ru/");
	}

	public function modify_channel_info(xnode $channel_node)
	{

	}

	public function modify_item_node(xnode $item_node, $data)
	{
		$text_without_tags = str_replace("<br", "\r\n <br", $data["text"]);
		$text_without_tags = strip_tags($text_without_tags);
		$item_node->create_child_node("yandex:full-text", $text_without_tags);
	}

}

?>